package hot;

import java.util.HashSet;
import java.util.Set;

public class Num461 {
    public static void main(String[] args) {
        Num461 n = new Num461();
        System.out.println(n.hammingDistance(4,1));
    }
    public int hammingDistance(int x, int y) {
        int count = 0;
        while(x > 0 || y > 0) {
            if((x & 1) != (y & 1))  {
                count++;
            }
            x = x >> 1;
            y = y >> 1;
        }
        return count;
    }
}
